# Maintainer: TheBitStick <thebitstick@tfwno.gf>
# Contributor: Rhys Kenwell <redrield+aur@gmail.com>

pkgname=sharexin
pkgver=r260.ec52dd5
pkgrel=1
pkgdesc="ShareX for Linux and BSD"
url="https://github.com/ShareXin/ShareXin"
makedepends=('rust' 'curl' 'gtk3' 'gdk-pixbuf2' 'cairo' 'glib2' 'openssl' 'dbus' 'xcb-util')
depends=('feh' 'imagemagick')
arch=('x86_64')
license=('GPL')
sha256sums=('SKIP')
source=("sharexin::git+https://github.com/ShareXin/ShareXin#branch=master")

pkgver() {
    cd "$pkgname"
    printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
}

build() {
    cd "$pkgname"
    cargo build --release
}

package() {
    cd "$pkgname"
    install -Dm755 "target/release/$pkgname" "$pkgdir/usr/bin/sharexin"
}
